import http from '@/utils/http'

export const productList = (params) => {
	const url = 'api/products'
	return http.get(url, { params })
}

export const productDetail = (id) => {
	const url = `api/product/detail/${id}`
	return http.get(url)
}

export const collectProduct = (params) => {
	const url = 'api/collect/add'
	return http.post(url, params)
}

export const cancelCollectProduct = (params) => {
	const url = 'api/collect/del'
	return http.post(url, params)
}
